<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>管理员登录</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <style>
        body {margin:0;}

        ul {
            list-style-type: none;
            margin: 0;
            padding: 0;
            overflow: hidden;
            background-color: #333;
            position: fixed;
            top: 0;
            width: 100%;
        }

        li {
            float: left;
        }

        li a {
            display: block;
            color: white;
            text-align: center;
            padding: 14px 16px;
            text-decoration: none;
        }

        li a:hover:not(.active) {
            background-color: #111;
        }

        .active {
            background-color: #4CAF50;
        }
    </style>
</head>
<body>

<ul>
    <li><a href="#">Root管理员端口</a></li>
    <li><a href="/CompetitionOs?flag=root">比赛管理</a></li>
    <li><a href="/AdminOs">比赛管理员管理</a></li>
    <li><a href="/LoginOut">退出系统</a></li>
</ul>
<div style="padding:20px;margin-top:30px;background-color:#1abc9c;height:1500px;">
<table class="table table-dark table-striped">
    <thead>
    <h1>比赛管理员列表</h1>
    </thead>
    <tbody>
    <tr>
        <th scope="row">Id</th>
        <td colspan="2">姓名</td>
        <td>密码</td>
        <td>管理员属性</td>
        <td>操作</td>
    </tr>
    <tr th:each="admin:${Admin}">
        <th scope="row"  th:text="${admin.adminId}"></th>
        <td colspan="2"  th:text="${admin.adminName}"></td>
        <td  th:text="${admin.adminPass}"></td>
        <td  th:text="${admin.adminType eq '1'?'比赛管理员':'Root管理员' }"></td>
        <td>
            <a class="btn btn-danger" id="del" th:href="@{/delAdmin/{adminId}(adminId=${admin.adminId})}" onClick="return confirm('确定删除?');">删除</a>
            <a class="btn btn-info" id="upd" th:href="@{/updAdmin/{adminId}(adminId=${admin.adminId})}">修改</a>
        </td>
    </tr>
    </tbody>
</table>
    <a class="btn btn-warning" id="ins" th:href="@{/insAdmin}" style="width: 500px;margin-left: 35%">新增管理员</a>



</div>
</body>
</html>